package com.easy;

/**
 * Created by Lxk on 2020/2/26.
 */
public class Solution392 {

    public boolean isSubsequence(String s, String t) {
        char[] chs = s.toCharArray();
        int k = -1;
        for (int i = 0; i < chs.length; i++) {
            k = t.indexOf(chs[i], k);
            if (k == -1) {
                return false;
            }
        }
        return true;
    }

}
